home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 37
/
Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso
/
Aminet
/
util
/
moni
/
CopperDecode.lha
/
CopperDecode
/
CopperShow.bas
< prev
next >
Wrap
BASIC Source File
|
1999-05-21
|
2KB
|
56 lines
' Copper List Screen disasassembler SNG May 1999, HiSoft BASIC, WB2+
WINDOW 1," AGA Copper Disassembler",(20,16)-(600,380),1+2+4+16+256
ver$="$VER: Copper Disassembler v2.2s © 21 May 1999 Simon N Goodwin"
LIBRARY OPEN"graphics.library":gfxbase&=LIBRARY("graphics.library")
IF gfxbase&=0 THEN PRINT "Graphics library not found!" : STOP
coplist&=PEEKL(gfxbase&+50) : REM Find long Frame Copper list
IF coplist&=0 THEN PRINT "Copper list not found!" : STOP
c&=coplist&
REPeat dis
w1%=PEEKW(c&) : w2%=PEEKW(c&+2) : PRINT c&,
IF w1% AND 1
REM WAIT or SKIP?
IF w2% AND 1 THEN PRINT "SKIP to "; ELSE PRINT "WAIT for";
PRINT " Y =";PEEK(c&);" X =";(PEEK(c&+1) AND 254);
IF (w2% AND 32766)<>32766 THEN PRINT "& %";BIN$(w2% AND 32766);
PRINT
ELSE
IF w1% AND (&hFE01-65536)
PRINT " Bad MOVE #";FN POS&(w2%);"to ";FN POS&(w1%)
ELSE
PRINT "MOVE "; : SELECT ON w1%
=142 TO 148
PRINT "(X=";PEEK(c&+3);",Y=";PEEK(c&+2);") to ";
IF w1%>144 THEN PRINT "DDF"; : ELSE PRINT "DIW";
IF w1% AND 2 THEN PRINT "START" : ELSE PRINT "STOP"
=224 TO 254
PRINT FN POS&(w2%);"to BPL";CHR$(49+(w1% AND 28)\4);
IF w1% AND 2 THEN PRINT "PTL" : ELSE PRINT "PTH"
=256 TO 262
PRINT "%";BIN$(w2%);" to BPLCON";CHR$(48+((w1%-256)\2))
=264 TO 266
PRINT w2%;"to BPL";CHR$(49+((w1% AND 2)=2));"MOD"
=268: PRINT PEEK(c&+2);"," ;(PEEK(c&+3)\16);
PRINT ",";(PEEK(c&+3) AND 15);"to BPLCON4"
=288 TO 318
PRINT FN POS&(w2%);"to SPR";CHR$(48+(w1% AND 28)\4);
IF w1% AND 2 THEN PRINT "PTL" : ELSE PRINT "PTH"
=384 TO 446: PRINT "R =";(w2%\256);:REM Palette change
PRINT "G =";((w2% AND 240)\16);"B =";(w2% AND 15);
PRINT "to COLOUR";((w1%-384)\2)
=484: PRINT "%";BIN$(w2%);" to DIWHIGH"
=508: PRINT "%";BIN$(w2%);" to FMODE"
=REMAINDER: PRINT FN POS&(w2%);"to $";HEX$(w1%)
END SELect
END IF
END IF : c&=c&+4
IF w1%=-1 AND w2%=-2 THEN PRINT " End of Copper List" : EXIT dis
END REPEAT dis : STOP
DEF FN POS&(t%)=-t%*(t%>=0)-(t%<0)*(65536+t%) ' REM Unsigned word